<template>
  <div>
    用户名：<input type="text" v-model="username" /> <br />
    密码： <input type="text" v-model="password" />
    <button @click="login">登陆</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: "",
      password: "",
    };
  },
  methods: {
    login() {
      //   localStorage.setItem("token", "jdsiqjoeq12i1021dheidjoe");
      let token = "jdsiqjoeq12i1021dheidjoe";
      this.$store.commit("setToken", token);
    },
  },
  created() {},
  mounted() {},
  components: {},
  computed: {},
  watch: {},
};
</script>

<style lang="scss" scoped></style>
